/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package asistenciadb;

/**
 *
 * @author micael
 */
public class consultas {

    conecta_mysql conecta;
     private Object rs;
     int x;

     public consultas() {
         conecta = new conecta_mysql();
     }

     public int reviza_run(int run, String pass){
        try{

           conecta.strStmt = conecta_mysql.conectar.createStatement();
           conecta.rs =conecta.strStmt.executeQuery("SELECT * FROM funcionarios WHERE run = '"+run+"' and pass = '"+pass+"';");

            while (conecta.rs.next())
            {
            x++;

            }

          // newConectar.desconectar();
        }catch(Exception e){
//falta mensaje de error
        }
        //newConectar.desconectar();
        return x;
    }

}
